package com.zelix;

import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

public class a4 extends x3
        implements ItemListener, ListSelectionListener, FocusListener, ActionListener {

    JComboBox f;
    DefaultComboBoxModel g;
    t3 h;
    DefaultListModel i;
    JTextField j;
    JTextField k;
    static String l[];
    private static String z[];

    public a4(JFrame jframe, jt jt1, int i1) {
        super(jframe, jt1, i1);
        b();
    }

    public void actionPerformed(ActionEvent actionevent) {
        Object obj = actionevent.getSource();
        a(obj);
    }

    void a() {
        op op1;
        op1 = super.c.s();
        if (op1 != null) {
            if (op1.t()) {
                f.setSelectedIndex(1);
            } else if (op1.s()) {
                f.setSelectedIndex(2);
            } else if (op1.r()) {
                f.setSelectedIndex(3);
            } else if (op1.q()) {
                f.setSelectedIndex(4);
            } else {
                f.setSelectedIndex(0);
            }
            if (op1.u())
                h.addSelectionInterval(0, 0);
            if (op1.e())
                h.addSelectionInterval(1, 1);
            if (op1.x())
                h.addSelectionInterval(2, 2);
            if (op1.w())
                h.addSelectionInterval(3, 3);
            if (op1.m())
                h.addSelectionInterval(4, 4);
            if (op1.i())
                h.addSelectionInterval(5, 5);
            if (op1.p())
                h.addSelectionInterval(6, 6);
            if (op1.o())
                h.addSelectionInterval(7, 7);
        }
    }

    public void focusGained(FocusEvent focusevent) {
        Object obj = focusevent.getSource();
        if (obj == j) {
            super.e.setText(z[22]);
        } else if (obj == k)
            super.e.setText(z[23]);
    }

    public void focusLost(FocusEvent focusevent) {
        super.e.setText(" ");
        Object obj = focusevent.getSource();
        a(obj);
    }

    public void itemStateChanged(ItemEvent itemevent) {
        Object obj = itemevent.getSource();
        if (obj == f && itemevent.getStateChange() == 1)
            switch (f.getSelectedIndex()) {
                default:
                    break;

                case 0: // '\0'
                    super.c.a(2);
                    break;

                case 1: // '\001'
                    super.c.e(2);
                    break;

                case 2: // '\002'
                    super.c.d(2);
                    break;

                case 3: // '\003'
                    super.c.c(2);
                    break;

                case 4: // '\004'
                    super.c.b(2);
                    break;
            }
    }

    void a(Object obj) {
        if (obj == j) {
            String s = j.getText().trim();
            if (s.length() == 0) {
                j.setText(super.c.p());
                f2.a(super.b, z[25], z[26]);
            } else {
                super.c.d(s);
            }
        } else if (obj == k) {
            String s1 = k.getText().trim();
            if (s1.indexOf("*") != -1) {
                k.setText(super.c.q());
                f2.a(super.b, z[25], z[24]);
            } else {
                super.c.e(s1);
            }
        }
    }

    public void b() {
        j0 j0_1 = new j0(this);
        setLayout(j0_1);
        g = new DefaultComboBoxModel();
        f = new JComboBox(g);
        i = new DefaultListModel();
        h = new t3(i);
        h.setSelectionMode(2);
        JLabel jlabel = new JLabel(z[2], 2);
        j = new JTextField();
        JLabel jlabel1 = new JLabel(z[18], 2);
        k = new JTextField();
        super.e = new JLabel(" ");
        add(f, z[11]);
        add(new q4(h), z[13]);
        add(j, z[7]);
        add(k, z[14]);
        add(super.e, z[10]);
        add(jlabel, z[5]);
        add(jlabel1, z[19]);
        j0_1.a(l);
        g.addElement(z[4]);
        g.addElement(z[3]);
        g.addElement(z[16]);
        g.addElement(z[21]);
        g.addElement(z[1]);
        i.addElement(z[12]);
        i.addElement(z[15]);
        i.addElement(z[20]);
        i.addElement(z[6]);
        i.addElement(z[8]);
        i.addElement(z[17]);
        i.addElement(z[0]);
        i.addElement(z[9]);
        a();
        j.setText(super.c.p());
        k.setText(super.c.q());
        f.addItemListener(this);
        h.addListSelectionListener(this);
        j.addFocusListener(this);
        k.addFocusListener(this);
        j.addActionListener(this);
        k.addActionListener(this);
    }

    public void valueChanged(ListSelectionEvent listselectionevent) {
        t3 t3_1;
        int i1;
        int j1;
        t3_1 = (t3) listselectionevent.getSource();
        i1 = i.getSize();
        j1 = 0;
        for (; j1 < i1; j1++) {
            switch (j1) {
                default:
                    break;

                case 0: // '\0'
                    super.c.k(t3_1.isSelectedIndex(j1), 2);
                    break;

                case 1: // '\001'
                    super.c.b(t3_1.isSelectedIndex(j1), 2);
                    break;

                case 2: // '\002'
                    super.c.n(t3_1.isSelectedIndex(j1), 2);
                    break;

                case 3: // '\003'
                    super.c.m(t3_1.isSelectedIndex(j1), 2);
                    break;

                case 4: // '\004'
                    super.c.g(t3_1.isSelectedIndex(j1), 2);
                    break;

                case 5: // '\005'
                    super.c.e(t3_1.isSelectedIndex(j1), 2);
                    break;

                case 6: // '\006'
                    super.c.j(t3_1.isSelectedIndex(j1), 2);
                    break;

                case 7: // '\007'
                    super.c.i(t3_1.isSelectedIndex(j1), 2);
                    break;
            }
        }
    }

//    private static char[] z(String s) {
//        char ac[] = s.toCharArray();
//        int clen = ac.length;
//        if (clen >= 2)
//            return ac;
//        ac[0] ^= 0x0e;
//        return ac;
//    }
//
//    private static String z(char ac[]) {
//        for (int i = 0; i < ac.length; i++) {
//            byte key = 0;
//            switch (i % 5) {
//                case 0:
//                    key = 0x53;
//                    break;
//                case 1:
//                    key = 6;
//                    break;
//                case 2:
//                    key = 84;
//                    break;
//                case 3:
//                    key = 5;
//                    break;
//                default:
//                    key = 14;
//                    break;
//            }
//            ac[i] ^= key;
//        }
//        return new String(ac).intern();
//    }

    static {
        z = new String[]{
                "!volatile",
                "package", "Name:", "public", "<access not specified>", "nameLbl",
                "transient", "nameFld", "!static", "!transient", "z/oj4\"Deo",
                "accessModifierComboBox", "static", "modifierList", "typeFld", "final",
                "protected", "!final", "Type:", "typeLbl", "volatile",
                "private", "Enter name of the field. May contain the \"*\" wildcard.", "Enter fully qualified class name or a primitive type. No wildcards.", "Field type cannot contain wildcards. Field restored.", "Error",
                "Field name must be specified. Field restored."};


        l = new String[]{
                "layout.height=nameFld.defaultHeight*7",
                "column1Width=max(accessModifierComboBox.defaultWidth, modifierList.defaultWidth)", "accessModifierComboBox.left=5", "accessModifierComboBox.top=5", "accessModifierComboBox.width=column1Width", "modifierList.left=5",
                "modifierList.top=accessModifierComboBox.bottom+5", "modifierList.width=column1Width", "modifierList.bottom=container.bottom-hintLbl.defaultHeight-20", "labelWidth=max(nameLbl.defaultWidth, typeLbl.defaultWidth)", "nameLbl.centerY=nameFld.centerY",
                "nameLbl.left=accessModifierComboBox.right+15", "nameLbl.width=labelWidth", "nameFld.left=nameLbl.right+1", "nameFld.top=5", "nameFld.right=container.right-5",
                "typeLbl.centerY=typeFld.centerY", "typeLbl.left=accessModifierComboBox.right+15", "typeLbl.width=labelWidth", "typeFld.left=typeLbl.right+1", "typeFld.top=nameFld.bottom+5",
                "typeFld.right=container.right-5", "z/oj4\"Deot:mawgc", "z/oj4\"Deot4gsw5;5dl4\"inm?$&el.\"gj.o", "z/oj4\"Deot$a`k.kkhm.7aif(xznd2\"%2"};
    }
}